package com.mark.dao;

import com.mark.pojo.Product;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductMapper {



    int insert(Product record);
    int updateByPrimaryKeySelective(Product record);




    int deleteByPrimaryKey(Integer id);



    int insertSelective(Product record);

    Product selectByPrimaryKey(Integer id);



    int updateByPrimaryKeyWithBLOBs(Product record);

    int updateByPrimaryKey(Product record);

    //4.分页查询所有的商品
    List<Product> selectList(@Param("ownerId") Integer ownerId);

    //5.根据商品的商品名称，商品Id组合查询,状态
    List<Product> searchProducts( @Param("ownerId") Integer ownerId,@Param("productName") String productName, @Param("productId") Integer productId, @Param("enableStatus") Integer enableStatus);

    List<Product> selectByNameAndCategoryIds(@Param("productName") String productName, @Param("categoryIdList") List<Integer> categoryIdList, @Param("ownerId") Integer ownerId);

    int selectCountByStatus(@Param("enableStatus") Integer enableStatus,@Param("ownerId") Integer ownerId);
}